IHipPreloadable

Usage:

class SomeScene : IHipPreloadable
{
    mixin Preload; ///IHipPreloadable lets you use Preload symbol. 

    ///Will load "someTexture.png" inside the member 'texture'
    @Asset("someTexture.png")
    IHipTexture texture;

    ///Loads game levels inside this variable
    @Asset("gameLevels.txt", &parseGameLevels)
    GameLevel[] gameLevels

    ///Doesn't need to call 'preload()' to populate. As it is variable, it will be populated right after its load.
    @Asset("helpText.txt")
    static string helpText;

    void initialize()
    {
        preload(); ///Needed to call for populating your assets after the class creation
    }

    GameLevel[] parseGameLevels(string data){return [];}
}

Members

Functions

getAssetsForPreload
string[] getAssetsForPreload()
Undocumented in source.
preload
void preload()
Undocumented in source.

Mixin templates

Preload
mixintemplate Preload()
Undocumented in source.

Meta